#ifndef __PhysicsQuaternion_H__
#define __PhysicsQuaternion_H__
#include "PhysicsVector.h"
class PhysicsQuaternion{
	private:
		float v[4];
	public:
		PhysicsQuaternion();
		PhysicsQuaternion(float w, float x, float y, float z);
		PhysicsQuaternion(const PhysicsQuaternion& o);
		~PhysicsQuaternion();
		PhysicsQuaternion& operator=(const PhysicsQuaternion& o);
		PhysicsQuaternion& operator+=(const PhysicsQuaternion& o);
		PhysicsQuaternion& operator-=(const PhysicsQuaternion& o);
		const PhysicsQuaternion& operator-() const;
		const PhysicsQuaternion& operator+(const PhysicsQuaternion& o) const;
		const PhysicsQuaternion& operator-(const PhysicsQuaternion& o) const;
		const PhysicsQuaternion operator*(const float f) const;
		const PhysicsQuaternion operator/(const float f) const;
		float& operator[](int i);
		const double operator*(const PhysicsQuaternion& o) const;
		bool operator==(const PhysicsQuaternion& o) const;
		bool operator!=(const PhysicsQuaternion& o) const;
		const double norm() const;
		const double squareNorm() const;
		void normalize();
		const PhysicsQuaternion inverse() const;
		const PhysicsQuaternion conjugate() const;
		const PhysicsQuaternion crossProduct(const PhysicsQuaternion& o) const;
		void angleAxis(float &angle, PhysicsVector &axis);
		friend ostream& operator<<(ostream& s, PhysicsQuaternion& p);
		friend istream& operator>>(istream& s, PhysicsQuaternion& p);
		friend const PhysicsQuaternion operator*(float f, PhysicsQuaternion p);
		friend const PhysicsQuaternion operator/(float f, PhysicsQuaternion p);
};
const PhysicsQuaternion operator*(float f, PhysicsQuaternion p);
const PhysicsQuaternion operator/(float f, PhysicsQuaternion p);
ostream& operator<<(ostream& s, PhysicsQuaternion& p);
istream& operator>>(istream& s, PhysicsQuaternion& p);
#endif	//__PhysicsQuaternion_H__
